
Spring Framework Reference Documentation
4.1.0.RELEASE Spring Framework viii
Properties, Arrays, Lists, Maps, Indexers ......................................................... 180
Inline lists ....................................................................................................... 181
Inline Maps .................................................................................................... 181
Array construction ........................................................................................... 182
Methods ......................................................................................................... 182
Operators ....................................................................................................... 182
Relational operators ................................................................................ 182
Logical operators .................................................................................... 183
Mathematical operators ........................................................................... 183
Assignment .................................................................................................... 184
Types ............................................................................................................. 184
Constructors ................................................................................................... 184
Variables ........................................................................................................ 184
The #this and #root variables .................................................................. 185
Functions ....................................................................................................... 185
Bean references ............................................................................................. 185
Ternary Operator (If-Then-Else) ....................................................................... 186
The Elvis Operator ......................................................................................... 186
Safe Navigation operator ................................................................................ 186
Collection Selection ........................................................................................ 187
Collection Projection ....................................................................................... 187
Expression templating ..................................................................................... 188
8.6. Classes used in the examples .......................................................................... 188
9. Aspect Oriented Programming with Spring ................................................................... 192
9.1. Introduction ..................................................................................................... 192
AOP concepts ................................................................................................ 192
Spring AOP capabilities and goals ................................................................... 194
AOP Proxies .................................................................................................. 195
9.2. @AspectJ support ........................................................................................... 195
Enabling @AspectJ Support ............................................................................ 195
Enabling @AspectJ Support with Java configuration ................................. 195
Enabling @AspectJ Support with XML configuration ................................. 196
Declaring an aspect ........................................................................................ 196
Declaring a pointcut ........................................................................................ 197
Supported Pointcut Designators .............................................................. 197
Combining pointcut expressions .............................................................. 199
Sharing common pointcut definitions ........................................................ 199
Examples ............................................................................................... 201
Writing good pointcuts ............................................................................ 203
Declaring advice ............................................................................................. 204
Before advice ......................................................................................... 204
After returning advice .............................................................................. 204
After throwing advice .............................................................................. 205
After (finally) advice ................................................................................ 206
Around advice ........................................................................................ 206
Advice parameters .................................................................................. 207
Advice ordering ...................................................................................... 210
Introductions ................................................................................................... 211
Aspect instantiation models ............................................................................. 211
Example ......................................................................................................... 212